#ifndef MYBUTTON_H
#define MYBUTTON_H

#include <QWidget>
#include <QPaintEvent>

class Mybutton : public QWidget
{
    Q_OBJECT
public:
    explicit Mybutton(QWidget *parent = nullptr);

protected:
    void mousePressEvent(QMouseEvent* eve);
    void mouseReleaseEvent(QMouseEvent* eve);
    void enterEvent(QEvent* eve);
    void leaveEvent(QEvent* eve);
    void paintEvent(QPaintEvent* eve);

private:
    QPixmap _pixmap;

signals:
    clicked(); // 自定义信号
};

#endif // MYBUTTON_H
